
package ch.hearc.coursJava.moo.heritage.animals;

import java.util.List;

public class UseAnimals
	{

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	public static void main(String[] args)
		{
		main();
		}

	public static void main()
		{
		Animals jerry = new Souris("jerry");
		Animals tom = new Chats("tom");
		Animals tigrou = new Tigres("tigrou");
		Animals donald = new Canards("donald", 54000);
		Animals rapace = new Rapaces("rapace", 12000);

		Zoo zoo = new Zoo();
		zoo.add(jerry);
		zoo.add(tom);
		zoo.add(tigrou);
		zoo.add(donald);
		zoo.add(rapace);

		System.out.println("==========Zoo original======\n");

		zoo.afficher();

		System.out.println("==========Zoo copie=========\n");

		Zoo zooClone = new Zoo(zoo);
		zooClone.add(new Tigres("TigreNew"));
		List<Animals> listAnimZoo = zooClone.getListAnimal();
		String ancienNom = listAnimZoo.get(0).getNom();
		String nouveauNom = ancienNom + "Clone";
		listAnimZoo.get(0).setNom(nouveauNom);
		zoo.manger();

		zooClone.afficher();

		System.out.println("==========Zoo original======\n");

		zoo.afficher();

		}



	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/


	}
